#include "sicasm.h"

int startaddr,proglen;
INTFIELD intrec;

void main(void)
{
 clrscr();
 cout<<"Enter Source Filename:";
 char *fname;
 cin>>fname;
 FILE *fptr;
 if((fptr=fopen(fname,"rt"))==NULL)
  {
   cout<<"\nFile Not Found";
   exit(0);
  }
 pass1(fptr);
 fclose(fptr);
 cout<<"\nPass 1 Completed.";
 cout<<"\nTotal Lines Assembled: "<<linecount;
 cout<<"\nTotal Errors: "<<error;
 if (error>0) cout<<"\nPass 2 aborted due to errors.";
 else {
  pass2();
  cout<<"\nPass 2 Completed";
 }
 getch();
}
